package com.powerhousecreative.q;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * @author Kenny Liao
 * 
 */
public class MainGridItem {	
	protected String imageUrl; 
	protected String title;
	protected String description;
	protected String videoID;
	protected String createDate;
	protected String owner;
	
	public MainGridItem(JSONObject entry) throws JSONException {
		super();		
		parseData (entry);
	}
	
	public void parseData (JSONObject entry) throws JSONException {
		this.imageUrl = entry.getJSONObject("snippet").getJSONObject("thumbnails").getJSONObject("medium").getString("url");
		this.title = entry.getJSONObject("snippet").getString("title");
		this.description = entry.getJSONObject("snippet").getString("description");
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getImageUrl() {
		return imageUrl;
	}
	
	public void setImageUrl(String url) {
		this.imageUrl = url;
	}
	
}
